<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">
<html lang="de">
    <head>
        <title>Hyphenator.js &ndash; Test 16</title>
        <meta http-equiv="content-type" content="text/html; charset=UTF-8">
        <style type="text/css">
            body {
                width:50%;
                margin-left:25%;
                margin-right:25%;
            }
            #test {
            	background-color: #ffd6d6;
            }
            #ref {
            	background-color: #d6ffd6;
            }
        </style>
        <script id="h" src="../Hyphenator.js" type="text/javascript"></script>
        <script src="files/jslint.js" type="text/javascript"></script>
        <script type="text/javascript">
			function loadScript() {
				var xhr = null;
				if (typeof XMLHttpRequest !== 'undefined') {
					xhr = new XMLHttpRequest();
				}
				if (!xhr) {
					try {
						xhr  = new ActiveXObject("Msxml2.XMLHTTP");
					} catch (e) {
						xhr  = null;
					}
				}
				if (xhr) {
					xhr.open('GET', "../Hyphenator.js", false);
					xhr.setRequestHeader('Cache-Control', 'no-cache');
					xhr.send(null);
					return xhr.responseText;
				}
			}
        </script>
    </head>
    <body>
		<p><a href="index.html">&lt;&lt;- index</a> | <a href="test15.html">&lt;- Prev</a> | <a href="test17.html">Next -&gt;</a></p>
        <h1>Test 16</h1>
        <p id="desc">Check Hyphenator with <a href="http://www.jslint.com/" target="_blank">JSLint</a>!</p>
		<pre><script type="text/javascript">
			JSLINT(loadScript());
			console.log(JSLINT.data());
			var errors = JSLINT.errors, l = errors.length, i, globals = JSLINT.data().globals, lg = globals.length, unused, lu = 0;
			if (JSLINT.data().unused) {
				unused = JSLINT.data().unused;
				lu = unused.length;
			}
			if (l > 0 || lg > 2 || lu > 0) {
				if (window != parent) {
					var msg = {
						desc: "Make JSLint happy ;-)",
						index: 16,
						result: 'failed'
					};
					parent.postMessage(JSON.stringify(msg), window.location.href);
				} else {
					document.writeln("JSLint error(s):\n");
					for (i = 0; i < l; i++ ) {
						document.writeln("\n" + errors[i].evidence + "\n");
						document.writeln("    Problem at line " + errors[i].line + " character " + errors[i].character + ": " + errors[i].reason);
					}
					for (i = 0; i < lg; i++ ) {
						if (globals[i] !== 'Hyphenator' && globals[i] !== 'window') {
							document.writeln("\n bad global:\n");
							document.writeln("    " + globals[i]);
						}
					}
					for (i = 0; i < lu; i++ ) {
						document.writeln("    unused variable \'" + unused[i].name + "\' at line: " + unused[i].line + " in function: " + unused[i].function);
					}
				}
			} else {
				if (window != parent) {
					var msg = {
						desc: "Make JSLint happy ;-)",
						index: 16,
						result: 'passed'
					};
					parent.postMessage(JSON.stringify(msg), window.location.href);
				} else {
					document.writeln("Hyphenator.js has JSLint check passed." );
				}
			}
		</script></pre>
     </body>
</html>